package com.packenius.library.xspdf;

/**
 * Direction of movement for transition styles WIPE, GLITTER, FLY, COVER, UNCOVER and PUSH.
 */
public enum XSMovementDirection implements XSPdfContent {
  /**
   * Left to right.
   */
  LeftToRight,

  /**
   * Bottom to top (WIPE only).
   */
  BottomToTop,

  /**
   * Right to left (WIPE only).
   */
  RightToLeft,

  /**
   * Top to bottom.
   */
  TopToBottom,

  /**
   * Top-left to bottom-right (GLITTER only).
   */
  TopLeftToBottomRight;

  /**
   * @see com.packenius.library.xspdf.XSPdfContent#getPdfContent(XSPDF)
   */
  public String getPdfContent(XSPDF xsPDF) {
    switch (this) {
    case LeftToRight:
      return "/Di 0";
    case BottomToTop:
      return "/Di 90";
    case RightToLeft:
      return "/Di 180";
    case TopToBottom:
      return "/Di 270";
    case TopLeftToBottomRight:
      return "/Di 315";
    }
    throw new XSPdfException("Impossible getPdfContent()!");
  }
}
